﻿using Microsoft.AspNetCore.Mvc;

namespace 日志的使用.自定义的内容
{
    public static class RegisterFilter
    {
        public static void AddFilter(this WebApplicationBuilder builder)
        {
            builder.Services.Configure<MvcOptions>(option => {
                option.Filters.Add<SelfExceptionFilter>(1); //数字越小执行就越靠前
                option.Filters.Add<SelfActionFilter>(2);
            });
        }
    }
}
